//
//  GiftView.h
//  DataSource
//
//  Created by shuihulu02 on 2016/11/29.
//  Copyright © 2016年 大兵布莱恩特. All rights reserved.
//

#import <UIKit/UIKit.h>
@class KeyboardView;
@class GiftView;
@class GiftBtn;

@protocol GiftViewDataSource <NSObject,UIScrollViewDelegate>

@required

/**
 *  有多少行
 *
 *
 *  @return  返回行数
 */
- (NSInteger)numberOfColumnsInWaterFlowView:(GiftView *)GiftView;
/**
 *  有多少列
 *
 *
 *  @return  返回列数
 */

-(NSInteger)GiftView:(GiftView*)GiftView numberOfRowsInRows:(NSInteger)rows;

/**
 *  总共有多少个表情
 *
 *  @param emojiView  emojiview
 *
 *  @return  返回表情个数
 */
-(NSInteger)numberOfItemsInEmojiView:(GiftView*)emojiView;



// 指定indexPath位置的单元格视图
- (GiftBtn *)GiftView:(GiftView *)GiftView cellForRowAtIndexPath:(NSIndexPath *)indexPath;


@end

@protocol GiftViewDelegate <NSObject,UIScrollViewDelegate>

@optional

/**
 *  选择了第几行第几个表情
 *
 */
-(void)GiftView:(GiftView *)GiftView didSelectRowAtIndexPath:(NSInteger)selectIndex;

/**
 *  每个表情图片的高度
 *
 *  @param indexPath indexPath
 *
 *  @return 返回一个高度
 */
-(CGFloat)GiftView:(GiftView *)GiftView heigthForRowAtIndexPath:(NSIndexPath*)indexPath;

/**
 *  每个表情图片的宽度
 *
 *  @param indexPath indexPath
 *
 *  @return 返回一个宽度
 */
-(CGFloat)GiftView:(GiftView *)GiftView widthForRowAtIndexPath:(NSIndexPath*)indexPath;

-(void)GiftView:(GiftView *)GiftView didSelectNumberFlowerBtn:(NSInteger)selectIndex;
-(void)GiftViewdidSelectChargeBtn;
@end
/**
 *  表情视图
 */
@interface GiftView : UIScrollView
/**
 *  datasource
 */
@property(nonatomic,assign)id<GiftViewDataSource>dataSource;

/**
 *  delegate
 */
@property(nonatomic,assign)id<GiftViewDelegate>mydelegate;

/**
 *  刷新数据源
 */
-(void)reloadDatasWithBool:(BOOL)isLive;
@property(nonatomic,assign)BOOL  isLive;

-(void)showWithKeyboard:(KeyboardView*)emojiView;
/**
 *  隐藏
 */
-(void)hiddenWithKeyboard:(KeyboardView*)emojiView;

@property(nonatomic,strong)UIView  *selfView;
/**
 *  分页控件
 */
@property(nonatomic,strong)UIPageControl  *pageControl;

/**
 *  textField
 */
@property(nonatomic,strong)UITextField  *textField;

/**
 *  删掉按钮
 */
@property(nonatomic,strong)UIButton  *senderBtn;
@property(nonatomic,strong)UIButton  *numberFlowerBtn;
@property(nonatomic,strong)UIButton  *beansNumber;
@property(nonatomic,strong)NSArray  *array;


@end
